package ftp;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @author shenhan
 * @create 2020/2/10 20:55
 * @description
 */
public class JobMethodInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
        doBefore(obj,method,args);
        return proxy.invokeSuper(obj, args);
    }

    private void doBefore(Object obj, Method method, Object[] args) {
//        SftpUtil.run();
        System.out.println("文件在上传中");
    }
}
